<?php

namespace JsonLowCode\Form\Fields;

use JsonLowCode\UI\SfcApi;
use JsonLowCode\Form\Abstract\FieldAbstract;

/**
 * @property SfcApi $element
 */
class SfcApiField extends FieldAbstract
{
    protected function booting(): void
    {
        $this->element = new SfcApi();
    }

    /**
     * @param string $api 远程sfc路径
     * @return $this
     */
    public function api(string $api): static
    {
        $this->element->api($api);
        return $this;
    }
}
